package com.itbaizhan.service.impl;

import com.itbaizhan.mapper.UserMapper;
import com.itbaizhan.pojo.User;
import com.itbaizhan.service.IUserService;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author spf
 * @date 2024/2/25
 * @time 16:19
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Trace
    @Override
    public List<User> findAll() {
        return userMapper.selectList(null);
    }

    @Trace
    @Override
    public User findById(Long id) {
        return userMapper.selectById(id);
    }
}
